package com.heima.test.job;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * @author mrchen
 * @date 2022/8/7 15:11
 */
@Component
public class HelloJob {
    @XxlJob("helloJob")
    public ReturnT handleJob(String params){
        System.out.println("指定的参数:  " + params);
        System.out.println("xxljob执行的定时任务:  "+ LocalDateTime.now());
        return ReturnT.SUCCESS;
    }


    @XxlJob("testJob")
    public ReturnT handleJob2(String params){
        System.out.println("测试的任务被执行啦:  "+ LocalDateTime.now());
        return ReturnT.SUCCESS;
    }
}
